<!DOCTYPE html>
<html>
<style>
	#d1{
		width:450px;
		height:360px;
		background-color:red;
		margin-left:400px;
		margin-top:20px;
		
	}
	
	#d2{
		height:40px;
		background-color:blue;
		color:yellow;		
	
	}
	
	table{
		color:black;
		font-size:24px;
		
	}
	
	

</style>
<script src="js/jquery-1.4.3.js"></script>

<script>
	$(function(){
		setInterval(quoto,1000);
	})
	
	function quoto(){
		$.ajax({
			"url":"quoto.do",	
			"type":"post",			
			"dataType":"json",
			"success":function(data){
				$('#tb1').empty();
				for(i=0;i<data.length;i++){
					var s=data[i];					
					$('#tb1').append(
						'<tr><td>'+s.code
						+'</td><td>'+s.name
						+'</td><td>'+s.price
						+'</td></tr>');
				}
			}
		});
	}
		
	
	
</script>

<head>
<meta charset="UTF-8">
<title>股票实时行情</title>
</head>
<body style="font-size:30px;" onload="showStocks();">
	<div id="d1">
		<div id="d2">股票实时行情</div>	

		<div id="d3">
			<table width="100%">
				<thead>
					<tr>
						<td>代码</td>				
						<td>名称</td>				
						<td>价格</td>				
					</tr>
				</thead>
				<tbody id="tb1">
				
				</tbody>
		
			</table>
		
		</div>	



	</div>


</body>
</html>

















